from api.ihrm_mange_dep_api import IHRMMangeDepApi
from common.token_util import TokenUtil


class DepIdUtil:

    @classmethod
    def get_dep_id(cls):
        #生成api对象
        dep_api = IHRMMangeDepApi()

        data = {"name":"测试部门999","code":"123789"}
        token = TokenUtil.get_token()
        resp = dep_api.add_dep_api(token,data)

        dep_id =resp.json().get("data").get("id")
        return dep_id



if __name__ == '__main__':
    DepIdUtil.get_dep_id()
